package org.jawa.learning.model;

import org.jawa.core.cache.CacheSizes;
import org.jawa.core.cache.Cacheable;
import org.jawa.core.cache.CannotCalculateSizeException;

public class Menu implements Cacheable {

	private Long id;

	private String menuName;

	private Long parentId;

	private String picture;

	private String menuUrl;

	private Long menuSort;

	private String click;

	private String dbclick;

	private String remark;

	public Long getId() {
		return id;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method sets the value of the database column app_menu.id
	 *
	 * @param id the value for app_menu.id
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method returns the value of the database column app_menu.menu_name
	 *
	 * @return the value of app_menu.menu_name
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public String getMenuName() {
		return menuName;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method sets the value of the database column app_menu.menu_name
	 *
	 * @param menuName the value for app_menu.menu_name
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public void setMenuName(String menuName) {
		this.menuName = menuName == null ? null : menuName.trim();
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method returns the value of the database column app_menu.parent_id
	 *
	 * @return the value of app_menu.parent_id
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public Long getParentId() {
		return parentId;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method sets the value of the database column app_menu.parent_id
	 *
	 * @param parentId the value for app_menu.parent_id
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method returns the value of the database column app_menu.picture
	 *
	 * @return the value of app_menu.picture
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public String getPicture() {
		return picture;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method sets the value of the database column app_menu.picture
	 *
	 * @param picture the value for app_menu.picture
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public void setPicture(String picture) {
		this.picture = picture == null ? null : picture.trim();
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method returns the value of the database column app_menu.menu_url
	 *
	 * @return the value of app_menu.menu_url
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public String getMenuUrl() {
		return menuUrl;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method sets the value of the database column app_menu.menu_url
	 *
	 * @param menuUrl the value for app_menu.menu_url
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public void setMenuUrl(String menuUrl) {
		this.menuUrl = menuUrl == null ? null : menuUrl.trim();
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method returns the value of the database column app_menu.menu_sort
	 *
	 * @return the value of app_menu.menu_sort
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public Long getMenuSort() {
		return menuSort;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method sets the value of the database column app_menu.menu_sort
	 *
	 * @param menuSort the value for app_menu.menu_sort
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public void setMenuSort(Long menuSort) {
		this.menuSort = menuSort;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method returns the value of the database column app_menu.click
	 *
	 * @return the value of app_menu.click
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public String getClick() {
		return click;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method sets the value of the database column app_menu.click
	 *
	 * @param click the value for app_menu.click
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public void setClick(String click) {
		this.click = click == null ? null : click.trim();
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method returns the value of the database column app_menu.dbclick
	 *
	 * @return the value of app_menu.dbclick
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public String getDbclick() {
		return dbclick;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method sets the value of the database column app_menu.dbclick
	 *
	 * @param dbclick the value for app_menu.dbclick
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public void setDbclick(String dbclick) {
		this.dbclick = dbclick == null ? null : dbclick.trim();
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method returns the value of the database column app_menu.remark
	 *
	 * @return the value of app_menu.remark
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public String getRemark() {
		return remark;
	}

	/**
	 * This method was generated by MyBatis Generator.
	 * This method sets the value of the database column app_menu.remark
	 *
	 * @param remark the value for app_menu.remark
	 *
	 * @mbggenerated Mon Sep 17 11:32:55 CST 2012
	 */
	public void setRemark(String remark) {
		this.remark = remark == null ? null : remark.trim();
	}

	@Override
	public int getCachedSize() throws CannotCalculateSizeException {
		int size = 0;
		size += CacheSizes.sizeOfObject(); // overhead of object
		size += CacheSizes.sizeOfLong(); // Id
		size += CacheSizes.sizeOfString(menuName); // menu Name
		size += CacheSizes.sizeOfLong(); // parentId
		size += CacheSizes.sizeOfString(picture); // menu picture
		size += CacheSizes.sizeOfString(menuUrl); // menu Url
		size += CacheSizes.sizeOfLong(); // menu Sort
		size += CacheSizes.sizeOfString(click); // menu click
		size += CacheSizes.sizeOfString(dbclick); //menu dbclick
		size += CacheSizes.sizeOfString(remark); // menu remark
		return size;
	}
}